package com.hejia.alauda.service;

import java.util.List;

import com.hejia.alauda.entity.Announcement;
import com.hejia.alauda.utils.Pager;

/**
 * 公告服务
 * 
 * @author hyr
 *
 */
public interface AnnouncementService {

	/**
	 * 查询公告
	 * @param pager
	 * @param title	标题
	 * @return
	 */
	Pager<Announcement> findAnnouncements(Pager<Announcement> pager, String title);

	/**
	 * 添加公告
	 * @param announcement 公告
	 * @return
	 */
	Announcement addAnnouncement(Announcement announcement);

	/**
	 * 删除公告
	 * @param id
	 */
	void deleteAnnouncement(Long id);

	/**
	 * 查询最新提醒公告
	 * @return
	 */
	Announcement findLatestAlertAnnouncement();

	/**
	 * 查询有效公告
	 * @return
	 */
	List<Announcement> findvalidAnnouncements();

	/**
	 * 查找公告
	 * @param id	公告ID
	 * @return
	 */
	Announcement findAnnouncementById(Long id);

	/**
	 * 更新公告
	 * @param announcement	公告
	 */
	void updateAnnouncement(Announcement announcement);

}
